<template>
  <view>
    <view v-if="type === 1">
      <view class="text-line">
        <text class="text-name">保险类型:</text>
        <text class="text-value">{{ ruleForm.payInsuranceName|filterNull }}</text>
      </view>

      <view class="text-line">
        <text class="text-name">赔付保险公司:</text>
        <text class="text-value">￥{{ ruleForm.receivableAmount|filterNull }}</text>
      </view>

      <view class="text-line">
        <text class="text-name">保险赔付金额(元)':</text>
        <text class="text-value">{{ ruleForm.payFee }}</text>
      </view>

      <view class="text-line">
        <text class="text-name">赔付时间:</text>
        <text class="text-value">{{ ruleForm.payDate|filterNull }}</text>
      </view>

      <view class="text-line">
        <text class="text-name">备注信息:</text>
        <text class="text-value">{{ ruleForm.remark|filterNull }}</text>
      </view>
    </view>

    <view v-if="type === 2">
      <view class="text-line">
        <text class="text-name">费用类型:</text>
        <text class="text-value">{{ ruleForm.feeName|filterNull }}</text>
      </view>

      <view class="text-line">
        <text class="text-name">应收金额(元):</text>
        <text class="text-value">￥{{ ruleForm.receivableAmount|filterNull }}</text>
      </view>

      <view class="text-line">
        <text class="text-name">付款对象:</text>
        <text class="text-value">{{ ruleForm.receivableObjName|filterNull }}</text>
      </view>

      <view class="text-line">
        <text class="text-name">生成应收账单:</text>
        <text class="text-value">{{ ruleForm.isGenerateReceivableBill === 1 ? '是' : '否' }}</text>
      </view>

      <view class="text-line">
        <text class="text-name">应付金额(元):</text>
        <text class="text-value">￥{{ ruleForm.payableAmount|filterNull }}</text>
      </view>

      <view class="text-line">
        <text class="text-name">收款对象:</text>
        <text class="text-value">{{ ruleForm.paymentObjName|filterNull }}</text>
      </view>

      <view class="text-line">
        <text class="text-name">生成应付账单:</text>
        <text class="text-value">{{ ruleForm.isGeneratePayableBill === 1 ? '是' : '否' }}</text>
      </view>

    </view>

  </view>
</template>

<script>
export default {
  name: 'collapseDetail',
  props: {
    value: {
      type: Object,
      default: {}
    },
    type: {
      type: Number,
      default: 0
    },
  },
  computed: {
    ruleForm: {
      get() {
        let that = this;
        const proxy = new Proxy(that.value, {
          get(target, key) {
            return Reflect.get(target, key);
          },
          set(target, key, value) {
            that.$emit("input", {...target, [key]: value});
            return true;
          },
        });
        return proxy;
      },
    }
  },
  watch: {},
  data() {
    return {};
  },
  created() {
  },
  mounted() {
  },
  methods: {},
};
</script>

<style scoped lang=""></style>


